package com.ruige.account.filter;



public class URLFilter {
//    /api/user/**
    public static String filterPath = "/api/wseckillorder,/api/seckill,/api/wxpay,/api/wxpay/**,/api/worder/**," +
            "/api/address/**,/api/wcart/**,/api/cart/**,/api/categoryReport/**,/api/orderConfig/**,/api/order/**,/api/orderItem/**," +
            "/api/orderLog/**,/api/preferential/* *,/api/returnCause/**,/api/returnOrder/**,/api/returnOrderItem/**,/api/auth/oauth/toRegister/**," +
        "/api/ka";
    public static boolean hasAuthorize(String url) {
        String[] split = filterPath.replace("**", "").split(",");
        for (String value : split) {
            if (url.startsWith(value)) {
                return true;//需要传递令牌
            }
        }
        return false;//不需要传递
    }
}